#ifndef FLAG_PTNPtnPTN_H
#define FLAG_PTNPtnPTN_H

#include <QWidget>
#include <QPushButton>
#include <QJsonObject>
#include <QHBoxLayout>
#include <QDebug>

class Flag_Ptn_Ptn_Ptn : public QWidget
{
    Q_OBJECT

public:
    explicit Flag_Ptn_Ptn_Ptn(const QJsonObject &flagDetails, QWidget *parent = nullptr);
    QPushButton* createStyledButton(const QString &text, const QString &iconPath);
    ~Flag_Ptn_Ptn_Ptn() override { qDebug() << "[Flag_Ptn_Ptn_Ptn] ~Flag_Ptn_Ptn_Ptn()";}
signals:
    void commandExecuted(const QString &command);

private:
    void setupControlLayout(const QJsonObject &flagDetails);
    void onButtonClicked();  // 添加声明

    QPushButton *button1 = nullptr;
    QPushButton *button2 = nullptr;
    QPushButton *button3 = nullptr;

    QMap<QString, QString> buttonCommandMap;
};

#endif // FLAG_PTNPtnPTN_H
